//
//  AppDelegate.swift
//  Swift微博
//
//  Created by 白鹭 on 2017/8/10.
//  Copyright © 2017年 com.bailun91. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    // MARK:- 登录控制器
    var defaultViewController : UIViewController{
        
        let isLogin = UserAccountViewModel.sharedUserAccountViewModel.isLogin
        return isLogin ? WelcomeVC():UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()!
        
    }
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        UINavigationBar.appearance().tintColor = UIColor.orange
        
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.rootViewController = defaultViewController
        window?.makeKeyAndVisible()
        
        return true
    }

   
}

